var api = require('../../../utils/api.js')
var $ = require('../../../utils/util.js')
var regeneratorRuntime = require('../../../utils/runtime.js')
var app = getApp()

Page({
  data: {
    recordFile: null,
    imgUrl: api.url, // 图片url
  },
  onLoad: function (options) {
    this.setData({
      equipment: options.equipment || '',
      company: options.company || '',
      factory: options.factory || '',
    })

    this.getRecordFile() // 查看档案
  },
  onShow: function () {

  },

  getRecordFile() { // 查看档案
    var params = {
      equipment: this.data.equipment,
      company: this.data.company,
      factory: this.data.factory,
    }
    api.$get(api.pollingManage.recordFile, params).then((res) => {
      this.setData({
        recordFile: res.data
      })
    })
  },
})